package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    void insert(List<SetmealDish> setmealDishes);

    @Select("SELECT * FROM setmeal_dish WHERE setmeal_id=#{id}")
    List<SetmealDish> getSelectID(Long id);

    @Delete("DELETE FROM setmeal_dish WHERE setmeal_id=#{setmeaId}")
    void delete(Long setmeaId);

    void deleteBySetmealId(List<Long> ids);
}
